# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Kwpolska <kwpolska@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Laszlo Papp <djszapi @ gmail at com>

pkgname=vim-nerdtree
pkgver=7.0.0
pkgrel=1
pkgdesc='Tree explorer plugin for navigating the filesystem'
url='https://github.com/preservim/nerdtree'
arch=('any')
license=('custom:WTFPL')
depends=('vim-plugin-runtime')
groups=('vim-plugins')
source=($url/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('1449e1a1cb7c4b8f61ab3e6b08b491d2151787230f89dbbd9971fb61a4b552b4b0cbdb6e1b085bc7210bdd502d6f73633be6861cdb5ba2eae14972cd0d614a27')
b2sums=('09bc06a7b7ae7be3c298da7a1e68e0ccce5ed7e54525c078539d47f36fa18022d695777a11bdbf1e048b10a948a17e949a59d955c5cde69bbbfd3cc169c5982d')

prepare() {
  cd nerdtree-${pkgver}
  sed 's|\[s:rootNERDTreePath,|["/usr/share/doc/vim-nerdtree",|' -i autoload/nerdtree.vim
}

package() {
  cd nerdtree-${pkgver}
  local _installpath="${pkgdir}/usr/share/vim/vimfiles"
  install -d "${_installpath}"
  cp -r -t "${_installpath}" autoload doc plugin syntax nerdtree_plugin lib
  install -Dm 644 CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENCE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.markdown CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
